home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Explosion
/
Software Explosion (Fore-Matt Home Computing)(1996).iso
/
games
/
workbench
/
lander_2
/
source
/
sounds.h
< prev
next >
Wrap
C/C++ Source or Header
|
1996-01-01
|
997b
|
45 lines
/* sounds.h - karl's meta-sample structure that defines stuff about sounds */
/* define the IOB array entries in sound structures */
#define MAX_SOUND_IOBS 5
#define ALLOC_IOB 0
#define PLAY_IOB 1
#define STOP_IOB 2
#define PERVOL_IOB 3
#define FREE_IOB 4
/* define the sound structure: this is the master structure, containing
* pointers to name, the sample data, the IOBs, and a message port */
/* note that cycles of zero is repeat-until-aborted */
typedef struct
{
char *name;
Sample *samplep;
int cycles, volume, flags, precedence, detune;
struct IOAudio *IOBs[MAX_SOUND_IOBS];
struct MsgPort *port;
} Sound;
/* definitions of sound port bits */
#define LEFT0 1
#define RIGHT0 2
#define RIGHT1 4
#define LEFT1 8
#define LEFTSIDE (LEFT0 | LEFT1)
#define RIGHTSIDE (RIGHT0 | RIGHT1)
/* flag bits */
#define PLAYING 1 /* controlled by software */
#define LEFT 2 /* user parameter */
#define RIGHT 0 /* placeholder user parameter */
#define EITHER 4 /* user parameter */